<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
        <title>排行榜</title>
        <link rel="stylesheet" href="/cdn/weui.min.css">
        <link rel="stylesheet" href="/cdn/jquery-weui.min.css">
        <script src="/cdn/jquery.min.10.js"></script>
        <script src="/cdn/jquery-weui.min.js"></script>
    </head>
    <body>
        <div class="top">
            <img src="/images/top.png" class="banner" />
            <ul>
               {loop $data as $datas}
               <li>
                   <a href="detail.html?id={$datas['id']}&corp_id={$corp_id}&agent_id={$agent_id}">
                       <h2><b>{$datas["title"]}</b><span class="danger">{if $time > $datas["end_time"]}已结束{else if $time < $datas["start_time"]}未开始{else}进行中{/if}</span></h2>
                       <p>{$datas["description"]}</p>
                       <div class="time">{$datas["start_time"]}<span>~</span>{$datas["end_time"]}</div>
                   </a>
               </li> 
               {/loop}
            </ul>
        </div>
    </body>
    <style>
        .top{
            text-align: center;
            background-color: #237cfe;
            min-height: 100vh;
            padding: 15px;
        }
        img.banner{
            max-width: 100%;
            height: auto;
        }
        ul,li{
            list-style: none;
        }
        li{
            background-color: #fff;
            border-radius: 5px;
            padding: 15px;
            text-align: left;
            margin-bottom: 20px;
        }
        li h2{
            font-size: 18px;
            color: #333333;
        }
        li h2 b{
            display: inline-block;
            max-width: calc(100% - 39px);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        li h2 span{
            float: right;
            font-size: 12px;
        }
        li h2 span.success{
            color: #67c23a;
        }
        li h2 span.warning{
            color: #e6a23c;
        }
        li h2 span.danger{
            color: #f56c6c;
        }
        li p{
            font-size: 14px;
            color: #666666;
            line-height: 24px;
            padding: 10px 0;
            display:-webkit-box;
            -webkit-box-orient:vertical;
            -webkit-line-clamp:2;
            overflow:hidden;
        }
        li .time{
            font-size: 12px;
            color: #666666;
        }
        li .time span{
            padding:0 10px;
        }
    </style>
</html>
